<template>
    <div class="newsss" v-html="data.title" @click="push"></div>
</template>

<script>
    export default {
        name: "news",
      data(){
          return{

          }
      },
      methods:{
        push:function () {
          this.$store.commit('videoContent',this.data)
          this.$router.push({name: 'newsContent', params: {data: this.data}})
        }
      },
      props: ['data'],
      created(){
        // console.log(this.data)
      }
    }
</script>

<style lang="less">
  @import "~less/base";
  .newsss{
    height: 100%;
    overflow: scroll;
    >h1>a{
      display: block;
      width: 100%;
      >div{
        display: inline-block;
        margin-top: 0.2rem;
      }
      >div:nth-child(1){
        margin-left: 0.1rem;
        width: 35%;
        img{
          width: 100%;
        }
      }
      >div:nth-child(2){
        font-size: 16px;
        font-weight: normal;
        float: right;
        width: 60%;
        height: 2rem;
        >div:nth-child(2){
          margin-top: 0.5rem;
          padding-right: 0.2rem;
          font-size: 12px;
          float: right;
          color: #c2c2c2;
        }
      }
    }
    >h1>a:active{
      background: #e4e4e4;
    }
  }
</style>
